/*
 * platform.h
 *
 *  Created on: 2012-8-25
 *      Author: dell
 */

#ifndef PLATFORM_H_
#define PLATFORM_H_
#ifdef  LIB_DLL_EXPORT
    #ifdef __WIN32
    #define MCF_EXPORT  __declspec(dllexport)
    #elif GNUC
    #define MCF_EXPORT  __attribute__ ((visibility))
    #endif
#else
    #define MCF_EXPORT
#endif

#ifdef  LIB_DLL_IMPORT
    #ifdef __WIN32
    #define MCF_IMPORT  __declspec(dllimport)
    #elif GNUC
    #define MCF_IMPORT  __attribute__ ((visibility))
    #endif
#else
    #define MCF_IMPORT
#endif

#ifdef __WIN32
#include"windows.h"
#include "process.h"
#include "io.h"
#define THREAD_API __stdcall
#define MCF_API __cdecl
#elif linux
#include "unistd.h"
#include "sys/cdefs.h"
#include "sys/mman.h"
#include "sys/types.h"
#include "sys/socket.h"
#include "arpa/inet.h"
#include "pthread.h"
#define THREAD_API __cdecl
#define MCF_API __cdecl
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#endif
#include "stdarg.h"
#include "float.h"
#include "setjmp.h"
#include "errno.h"
#include "limits.h"
#endif /* PLATFORM_H_ */
